const fs = require("fs")
const path = require("path")

function writefs(name,content){
    return new Promise((resolve,reject)=>{
        fs.writeFile(path.join(__dirname,name),content,{flag:"a",encoding:"utf-8"},(err,data)=>{
            if(err){
                reject(err)
            }else{
                resolve(data)
            }
        })
    })
}

module.exports = writefs